package com.cq.androidtools.inline

import com.cq.androidtools.databinding.ActivityUserBinding
import com.cq.androidtools.jetpack.databinding.DataBindingActivity

/**
 * 作者: CQ
 * 日期: 2021-07-01
 * 说明:
 */
class InLineActivity : DataBindingActivity<ActivityUserBinding>() {
    override fun ActivityUserBinding.initBinding() {

    }

    override fun intData(){
        let { it.d() }
        aet { it.a() }
        bet {
            println("bbbbb")
         }
        ret { it.c() }
    }


    fun a() {
    }

    fun b() {
        println("bbbbb")
    }

    fun c() {

    }
    fun d() {

    }
    inline fun <T, R> T.aet(block: (T) -> R): R {
        return block(this)
    }
    inline fun <T> T.bet(block: (T) -> (Unit)) {

    }
    fun <T, R> T.ret(block: (T) -> R): R {
        return block(this)
    }

}